<?php

#namespace Giocondo;

# label -- A widget which shows a small amount of text.
class Label extends Widget {
	protected $options = array(
		'text' => ''
	);

	#const default_option = 'text';
	public $default_option = 'text';

	public function display($options=array()) {
		parent::display();

		# TODO: spaces in text should be converted to &nbsp; ?
		XHtml::element('label', String::filter($this->options['text'], 'p'),
			array('id'  => $this->id));
	}
}

# End of file
# vim: set ts=2 sw=2 noet:
?>
